package com.thoughtworks.twu.module1;

public final class Utilities {
    private Utilities() {

    }

    public static void printTitle(String title) {
        final String divider = "-------------------------------------------------------";

        System.out.println();
        System.out.println(divider);
        System.out.println(title);
        System.out.println(divider);
    }

    public static void printLineOfAsterisks(int count) {
        printMultipleAsterisks(count);
        System.out.println();
    }

    public static void printMultipleAsterisks(int count) {
        printMultipleTimes("*", count);
    }

    public static void printMultipleSpaces(int count) {
        printMultipleTimes(" ", count);
    }

    public static void printMultipleTimes(String text, int count) {
        for (int i = 0; i < count; i++) {
            System.out.print(text);
        }
    }
}
